﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;

namespace S4Store.Domain
{
    public class PinPai
    {
        public PinPai()
        {
            CarBrands = new HashSet<CarBrand>();
        }

        public int Id { get; set; }
        public string Name { get; set; }
        public bool IsClose { get; set; }

        public virtual ICollection<CarBrand> CarBrands { get; set; }

        [NotMapped]
        public virtual IEnumerable<CarBrand> EnableCarModels
        {
            get
            {
                return CarBrands.Where(t => !t.IsClose);
            }
        }
    }
}
